package com.a01_2021.thousandstimes.general.service;

import com.a01_2021.thousandstimes.exception.CustomException;
import com.a01_2021.thousandstimes.general.entity.ExperienceDetail;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author E1xP
 * @since 2021-03-27
 */
public interface IExperienceDetailService extends IService<ExperienceDetail> {
    void doEvaluate(long userId, LocalDate date) throws CustomException;

    boolean canEvaluate(long userId, LocalDate date);

    boolean isHrVote(long userId, LocalDate date);

    void tryEvaluate(Long beVoteUserId, LocalDate voteTime) throws CustomException;

    void planExecute(Long userId, LocalDate date) throws CustomException;

    Map<String, Object> getExperienceDetail(long experienceId);

    double getAvgScore(Long id);

    List<ExperienceDetail> getFromInstanceIdAndUserId(Long userId, long instanceId);

    void insertIntoMaster(List<ExperienceDetail> experienceDetailList, Map<Long, Long> map);
}
